{% load my_tags %}
{% load static %}

<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" href="{% url 'main:index' %}">
                <img style="margin-top: -5px" alt="Brand" src="/static/phone/phone.png">
            </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul style="margin-left: 20px" class="nav navbar-nav">
                <li class="">
                    <img style="float: left; margin-top: 13px" src="/static/phone/码表.png" alt="">
                    <a style="margin-left: 20px; font-size: 18px" href="{% url 'main:index' %}">仪表盘</a>
                </li>
                <li class="">
                    <img style="float: left; margin-top: 13px" src="/static/phone/phone(1).png" alt="">
                    <a style="margin-left: 20px; font-size: 18px" href="{% url 'main:phone_manage' %}">号码管理</a>
                </li>
                <li class="">
                    <img style="float: left; margin-top: 13px" src="/static/phone/列表.png" alt="">
                    <a style="margin-left: 20px; font-size: 18px" href="{% url 'main:combo' %}">查看套餐</a>
                </li>

            </ul>
            <ul class="nav navbar-nav navbar-right">

                {% if request.user.is_authenticated %}

                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false">{{ request.user.username }} <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="{% url 'user:center' %}">个人中心</a></li>
                            <li><a href="{% url 'user:change_password' %}">修改密码</a></li>
                            <li><a href="{% url 'user:change_head' %}">修改头像</a></li>
                            <li><a href="{% url 'user:change_username' %}">修改用户名</a></li>

                            <li role="separator" class="divider"></li>
                            <li><a href="{% url 'user:logout' %}">退出</a></li>
                        </ul>
                    </li>
                {% else %}
                    <li><a href="{% url 'user:login' %}">登录</a></li>
                    <li><a href="{% url 'user:register' %}">注册</a></li>
                {% endif %}


            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>